home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / xvisrc.zip / TOS.H < prev    next >
C/C++ Source or Header  |  1992-07-28  |  3KB  |  113 lines

  1. /* Copyright (c) 1990,1991,1992 Chris and John Downey */
  2. /***
  3.  
  4. * @(#)tos.h    2.1 (Chris & John Downey) 7/29/92
  5.  
  6. * program name:
  7.     xvi
  8. * function:
  9.     Portable version of UNIX "vi" editor, with extensions.
  10. * module name:
  11.     tos.h
  12. * module function:
  13.     Definitions for TOS system interface module.
  14. * history:
  15.     STEVIE - ST Editor for VI Enthusiasts, Version 3.10
  16.     Originally by Tim Thompson (twitch!tjt)
  17.     Extensive modifications by Tony Andrews (onecom!wldrdg!tony)
  18.     Heavily modified by Chris & John Downey
  19.  
  20. ***/
  21.  
  22. #ifndef    HELPFILE
  23. #   define  HELPFILE    "c:\\bin\\help.xvi"
  24. #endif
  25.  
  26. /*
  27.  * System-dependent constants
  28.  */
  29.  
  30. /*
  31.  * These numbers may not be right for TOS; who knows?
  32.  */
  33. #define    MAXPATHLEN    79    /* maximum length of full path name */
  34. #define    MAXNAMLEN    12    /* maximum length of file name */
  35. #define    DIRSEPS        "\\"
  36.  
  37. extern    int        Rows;            /* size of screen */
  38. extern    int        Columns;
  39.  
  40. /*
  41.  * Default file format.
  42.  */
  43. #define DEF_TFF        fmt_TOS
  44.  
  45. /*
  46.  * No need to flush output - it has already happened.
  47.  */
  48. #define    flush_output()
  49.  
  50. /*
  51.  * Terminal driving functions.
  52.  */
  53. #define    erase_line()    outstr("\033K")    /* erase to end of line */
  54. #define    insert_line()    outstr("\033L")    /* insert one line */
  55. #define    delete_line()    outstr("\033M")    /* delete one line */
  56. #define    erase_display()    outstr("\033E")    /* erase display */
  57. #define    invis_cursor()    outstr("\033f")    /* invisible cursor */
  58. #define    vis_cursor()    outstr("\033e")    /* visible cursor */
  59. #define    scroll_up(x, y, z)    st_scroll((x),(y),(z))    /* scroll up area */
  60. #define    scroll_down(x, y, z)    st_scroll((x),(y),-(z))    /* scroll down area */
  61.  
  62. #define    cost_goto    8            /* cost of using tty_goto() */
  63. #define    can_ins_line    TRUE
  64. #define    can_del_line    TRUE
  65. /*
  66.  * tty_linefeed() isn't needed if can_del_line is TRUE.
  67.  */
  68. #define tty_linefeed()
  69.  
  70. #define    can_scroll_area    TRUE
  71.  
  72. #define    can_inschar    FALSE
  73. #define    inschar(c)
  74.  
  75. /*
  76.  * Colour handling: just b/w on Ataris at the moment.
  77.  */
  78. #define    DEF_COLOUR    0
  79. #define    DEF_STCOLOUR    1
  80. #define    DEF_SYSCOLOUR    0
  81.  
  82. /*
  83.  * Macros to open files in binary mode,
  84.  * and to expand filenames.
  85.  */
  86. #define fopenrb(f)    fopen((f), "rb")
  87. #define fopenwb(f)    fopen((f), "wb")
  88. #define    fexpand(f)    (f)
  89.  
  90. #define call_system(s)    system(s)
  91. #define call_shell(s)    forkl((s), (char *) NULL)
  92.  
  93. /*
  94.  * Declarations for system interface routines in tos.c.
  95.  */
  96. extern    int        inchar(long);
  97. extern    void        outchar(char);
  98. extern    void        outstr(char *);
  99. extern    void        alert(void);
  100. #ifndef LATTICE
  101.     extern  bool_t    remove(char *);
  102. #endif
  103. extern    bool_t        can_write(char *);
  104. extern    void        sys_init(void);
  105. extern    void        sys_startv(void);
  106. extern    void        sys_endv(void);
  107. extern    void        sys_exit(int);
  108. extern    void        tty_goto(int, int);
  109. extern    void        delay(void);
  110. extern  void        sleep(unsigned);
  111. extern  void        set_colour(int);
  112. extern  char        *tempfname(char *);
  113.